import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    showSearch: false,
    showDialog: false,
    dialogTitle: '',
    searchResultList:null,
    showNavArrow:false
  },
  getters: {
    showSearch(state) {
      return state.showSearch;
    },
    showDialog(state) {
      return state.showDialog
    },
    dialogTitle(state) {
      return state.dialogTitle
    },
    showNavArrow(state){
      return state.showNavArrow
    }
  },
  mutations: {
    setShowSearch(state, reload) {
      state.showSearch = reload
    },
    setShowDialog(state, repload) {
      state.showDialog = repload
    },
    setDialogTitle(state, repload) {
      state.dialogTitle = repload
    },
    setSearchResultList(state, repload) {
      state.searchResultList = repload;
    },
    setShowNavArrow(state,repload){
      state.showNavArrow=repload
    }
  },
  actions: {
  },
  modules: {
  }
})
